package collection;

import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;

public class collection6 {

    public static void main(String[] args) {
        Queue<String> queue = new ConcurrentLinkedQueue<>();
        queue.add("ytt");
        queue.add("ye");
//        queue.element()只读，不取
//        System.out.println( queue.element());
//        System.out.println( queue.element());

        System.out.println(queue.poll());
        System.out.println(queue.poll());
//        System.out.println(queue.remove());
//        System.out.println(queue.remove());
    }
}
